from django.db import models

# Create your models here.
class ClassModel(models.Model):
    name=models.CharField(max_length=12)
    class Meta:
        db_table='class'
class GoodsModel(models.Model):
    name=models.CharField(max_length=120)
    kind=models.CharField(max_length=12)
    title=models.CharField(max_length=12)
    numbers1=models.IntegerField()
    numbers2=models.IntegerField()
    addtime=models.DateTimeField(auto_now_add=True)
    clas=models.ForeignKey('ClassModel',on_delete=models.CASCADE)
    class Meta:
        db_table='goods'

